package copier

import (
	"github.com/jinzhu/copier"
	"github.com/pkg/errors"
)

func Copy(toValue interface{}, fromValue interface{}) error {
	if err := copier.Copy(toValue, fromValue); err != nil {
		return errors.Wrap(err, "copy error")
	}
	return nil
}
